home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
fish
/
676-700
/
696
/
tinyclock
/
tinyclock.doc
< prev
next >
Wrap
Text File
|
1995-03-18
|
8KB
|
221 lines
short: a cute little analog clock (2.x only)
TinyClock v1.04
---------------
Copyright (C) Martin W. Scott, 1992.
NB: TinyClock only works with AmigaDos 2.0 or higher (sorry).
[Released in June '92.]
TinyClock is CARDWARE, ie. if you like and use it, send me a postcard
from your area -- it's not too much to ask, is it? My address is at the
end of this document.
History
-------
v1.04 - alarm window now has 'Time now' gadget to fill in current time.
- increased audio priority of beep, so sound gets through when it
needs to (unless programs ask for the audio.device with a higher
priority than they ought too...).
v1.03 - now has alarm facility.
- fixed small bugette whereby minute hand was not pointing to
the exactly ideal place -- now you can read-off the minutes
fairly accurately with a small window.
v1.02 - now optionally pops its window to front when obscured; thus,
v1.01 and below .config files will not be loaded -- sorry...
v1.01 - now sets its priority to 10, to update on time regardless
of heavy CPU load.
- improved beep sound (doesn't 'grate' so much now).
v1.0 - initial release.
Overview
--------
There are far too many clock programs for the Amiga -- it seems that
no-one likes what's on offer and so writes their own, and places it in
the Public Domain. And good, too: we have a LOT of choice.
But what about analog clocks? Well, there's Commodore's clock, but that
uses over 40K memory and too much of the processor. Then there's
WizardClock, but again that is big, and not resizeable (though it is
neat, and has lots of nice extras). And lastly (as far as I know) there's
FAClock, but the less said about that the better...
But, like so many before me, the clock I wanted wasn't there. One that
came close was a small analog clock by Matt Dillon. It was rather too
limited though. However, using that source as a starting point, I
produced TinyClock. Much has been added, for both aesthetics and
functionality. Here's a rundown of TinyClock's features:
- Resizeable analog display;
- Optionally pops its window to front when obscured;
- Colors used in clock rendering can be changed as desired;
- Can save position etc. for subsequent runs;
- Optionally chirps every quarter-hour, and twice on the hour;
- Has an alarm facility;
- Whole window is a 'drag bar', except right-hand and bottom
edges, which act as a 'sizing gadget';
- Displays day and date in MenuBar when window is active;
- WB 2.0 'icon look', with menus that use screen's font;
- Small binary (about 7K), uses only 14K memory running;
- Uses tiny amount of processor (only redraws when necessary).
My aim is to make TinyClock the clock you want, as ubiquitous as xclock
on Sun Workstations.
Usage Notes
-----------
To start, double click on the TinyClock icon. The first time you run,
the clock will use default sizes and colors - configure it the way you
want, and select 'Save prefs' from the TinyClock menu. TinyClock will
then always use these settings. (The preferences are saved to a file
called 'S:TinyClock.config'.)
I find the best position to be the top right-hand corner of the screen.
You may of course start TinyClock from the CLI, but it does not
self-detatch, and would have to be 'run' if you wanted to continue using
the CLI.
Best way to start it, though, is to shove it in your WBStartup drawer;
if you do, set the DONOTWAIT tooltype for Workbench.
To keep binary size down, TinyClock takes no command-line options or
tooltypes - it uses a config-file instead, as mentioned above. A stack
of 2500 bytes seems sufficient for TinyClock (I've had no problems).
Strange behaviour
-----------------
Since TinyClock updates once every four seconds, it will take (at most)
that long for its window to come to the front if obscured, and for the
display to reflect a new system time. However, the display will update
on the minute, not a few seconds either side.
The imagery used to draw the clock (hands, pips) is NOT width-scaled
(unlike the Commodore clock). TinyClock is intended to be just that, and
looks pretty ugly if made large. But then, who wants a clock taking up
half the screen?
No other unexpected behaviour is known.
The Menus
---------
Self-explanatory, I hope. Here's a quick rundown though...
TinyClock menu (all items have shortcuts as indicated):
To Front F Sends clock window to front (there are no depth gadgets)
To Back B Sends clock window to back
Auto Front A Bring window to front when it's obscured by others
Chirp C If checked, will beep on quarter-hour (& twice on the hour)
Reset prefs R Reloads previously saved configuration
Save prefs S Save current position/size/colors to configuration file
About... ? Displays a small message from your sponsor
Quit Q You don't want to do that...
Colors menu: (0-3 denote system colors)
Background The color of the clock window
Hour hand The color of the hour hand
Minute hand The color of the minute hand
Pips The color of the pips (hour marks)
If using Workbench default (2.0) colors,
0 is lightish-grey,
1 is black,
2 is white,
3 is mid-blue.
Of course, some combinations look better than others, and some are
downright useless (like black hands on a black background...).
Alarm menu:
Set... Pops up a requester letting you set alarm time
Alarm On
Alarm Off Have a wild guess...
Usage of alarm requester should be fairly obvious. It uses a 24-hour
clock, with hour 00 meaning midnight. The alarm time is stored in the
.config file. Once you've modified the alarm time, click 'OK' to accept.
Clicking 'Cancel' means that you're (session) preferences go unchanged.
Clicking 'Time now' fills in the current time, in case the time you want
to set is close to this.
Once you've set your alarm time, you should select the 'Alarm On' menu
item if it's not already checked, to enable alarm signals. If you want
to use the same alarm time regularly, you may 'Save Prefs'.
One other thing: while you are setting the alarm time, the clock window
won't update. This shouldn't be a major hassle.
That's the menus. As mentioned in the 'features' list, almost the whole
window is a 'drag bar' (this is like some programs' iconified states).
The picture below shows what parts of the window do what:
+-------------------------+-+
| | |
| | |
| Click here to | <---- Click in this region
| | |
| position | | to resize window
| | |
| window | |
| | |
| | |
+-------------------------+ |
+---------------------------+
Author and Credits
------------------
Original clock code was (C) Matt Dillon (although it's now unrecognisable).
TinyClock is written in C and compiled with SAS (Lattice) C v5.10a.
Thanks to Mike Meyer et al. for Mg3 (the best pd text editor) and Steve
Koren for SKsh. Pierre Ardichvile suggested the pop-to-front option.
GadToolsBox v1.3 generated the alarm window and gadgets - thanks to Jaba
Development for a great program.
I am always happy to receive bug-reports, comments or suggestions for
enhancement of programs I write. I can be contacted by postal mail at:
Martin W. Scott,
23 Drum Brae North,
Edinburgh,
EH4 8AT
United Kingdom.
Send your postcards to that address too...
You may also contact me by email: mws@castle.ed.ac.uk
TinyClock is freely redistributable, as long as this documentation
(unaltered) accompanies it. It may not be sold for profit or included in
any commercial product (and that includes magazines) without permission.
Remember, TinyClock is CARDWARE (see head of document). I'm rather hacked
off about the lack of feedback for programs I write; no postcards => no
updates or future programs.
Contributions are not obligatory, but are always welcome (I'm yet
another poor student).
Oh, and I'm happy to do foreign language versions if you want to give me
translations of *every* menu in the program.
Enjoy!
Martin.